Component({
  data: {
    tabBarActive: true,
    selected: 0,
    backgroundColor: "#000000",
    color: "#f90000",
    list: [
      {
        "selectedIconPath": "/static/img/home_hover.png",
        "iconPath": "/static/img/home.png",
        "pagePath": "/pages/recomm/index"
      },
      {
        "selectedIconPath": "/static/img/clas_hover.png",
        "iconPath": "/static/img/clas.png",
        "pagePath": "/pages/backList/index"
      },
      {
        "selectedIconPath": "/static/img/my.png",
        "iconPath": "/static/img/my.png",
        "pagePath": "/pages/user/index"
      }
    ]
  },
  attached() {
    console.log(32)
  },
  methods: {
    switchTab(e) {
      const data = e.currentTarget.dataset
      // if (data.index === this.data.selected) {
      //   return
      // }

      // this.setData({
      //   selected: data.index
      // })
      
      const url = data.path
      wx.switchTab({ url })
    }
  }
})